package com.work.work2;
public  class Frog extends Animal implements Swim{
    public Frog(String name, String color, String category) {
        super(name, color, category);
    }

    public Frog() {
    }
    @Override
    public void shout(){
        System.out.println("正在呱呱的叫····");
    }
    @Override
    public void eat(){
        System.out.println("青蛙是" + getCategory() + "爱吃昆虫");
    }
    public String toString(){
       return "那只" + getColor() + "的，名叫" + super.getName() + "的青蛙";
    }

    @Override
    public void Swim() {
        System.out.println("虽然不是鱼，但青蛙也是泳坛高手！！！");
    }
}